<html>
<head>
<meta charset="utf-8">
</head>
<body>
<style>
#hitokoto{
	font-size: 16px;
	background-image: -webkit-linear-gradient(left,#6ad9c5,#72d39c,#bed851);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
   font-family: "PingFang", sans-serif;
}
#output {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	z-index: -10;
}
</style>
	<div class="result" onclick="copyText()">
		<p id="hitokoto"></p>
	</div>
<textarea id="output"></textarea>
<script>
	function copyText() {
		var text = document.getElementById("hitokoto").innerHTML;
	var output = document.getElementById("output");
	output.value = text;
	output.select();//选中文本
	document.execCommand("copy");
	window.alert("已复制");
}
</script>
<script src="https://v1.hitokoto.cn/?encode=js&select=%23hitokoto" defer></script>
</body>
</html>
